<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Operation Page</title>
</head>

<body>

</body>
<script>
    function jisuanqi() {
        var mun1 = prompt("请输入第一个数:");
        var operation = prompt("请输入操作符:");
        var mun2 = prompt("请输入第二个数:");
        if (mun1 == "" || mun1 == null || mun2 == "" || mun2 == null) {
            alert("输入错误，请重新输入！");
            location.reload();
        } else {
            mun1 = parseFloat(mun1);
            mun2 = parseFloat(mun2);
            switch (operation) {
                case "+":
                    alert(mun1 + mun2);
                    break;
                case "-":
                    alert(mun1 - mun2);
                    break;
                case "*":
                    alert(mun1 * mun2);
                    break;
                case "/":
                    alert(mun1 / mun2);
                    break;
                default:
                    alert("输入错误，请重新输入！");
                    location.reload();
                    break;
            }
        }
    }
    alert(jisuanqi());
</script>

</html>